import { Code, InlineCode } from '~/components/text/code'
import Link from '~/components/text/link'
import {
  InputTable,
  OutputTable,
  Row,
  Cell,
  TypeCell,
  BoldCell,
  BooleanCell
} from '~/components/api/table'
import Endpoint from '~/components/api/endpoint'
import Request from '~/components/api/request'
import { P } from '~/components/text'

export const meta = {
  editUrl: 'pages/docs/api/v2/api-docs-mdx/endpoints/user.mdx',
  lastEdited: '2019-10-17T14:44:04.000Z'
}

## User

### Get the authenticated user

<Endpoint method="GET" url="https://api.zeit.co/www/user" />

Retrieves information related to the authenticated user.

##### Example Request

<Request
  url="https://api.zeit.co/www/user"
  headers={{
    Authorization: `Bearer ${
      props.testingToken ? props.testingToken.token : '<TOKEN>'
    }`
  }}
/>

##### Example Response

<Code lang="json">{`{
  "user":{
    "uid":"96SnxkFiMyVKsK3pnoHfx3Hz",
    "email":"john@user.co",
    "name":"John Doe",
    "username":"john-doe",
    "avatar":"c51b0a8e9ef8e44a79472c6a3da64add0d742a0f",
    "platformVersion":1,
    "billing":{
      "plan":"free",
      "period":null,
      "trial":null,
      "cancelation":null,
      "addons":null
    },
    "bio":"I work at John Doe Inc.",
    "website":"john-doe.com",
    "profiles":[
      {
        "service":"website",
        "link":"john-doe.com"
      }
    ]
  }
}`}</Code>
